<#import "./layout/layout.ftl" as layout>
<@layout.page menu='activityMgt'>
<script src="../../js/mgt/myActivity/myActivity.ajax.js"></script>
<script src="../../js/mgt/myActivity/myActivity.js"></script>

<p class="right-top-subContent"><a href="javascript:void(0);" onclick="pageSkip.goToMyHdj();">管理中心</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a
    href="javascript:void(0);" onclick="pageSkip.goToMyActivityList();">活动管理</a></p>
<!--底部区域-->
<div class="right-bottom-content" id="right-bottom-content">
  <!--活动操作-->
  <div class="activity-options">
    <div class="activity-left-opts">
      <span class="activity-all selected" data-value="0">全部</span>
      <span class="activity-signup" data-value="5">报名中</span>
      <span class="activity-doing" data-value="1">进行中</span>
      <span class="activity-finish" data-value="2">已结束</span>
      <span class="activity-illegal" data-value="3">违规</span>
      <span class="activity-temple" data-value="4">未发布</span>
    </div>
    <!--<div class="activity-right-opts">-->
    <!--<button class="activity-new" onclick="pageSkip.openEditStudio()"><i class="fa fa-plus"></i>创建活动</button>-->
    <!--</div>-->
  </div>
  <!--全部-->
  <div class="activity-project activity-content-0">
    <div class="activity-inner-box" id="activity_list_all">
      <img class="no-data-arrow" src="../../images/mgt/myActivity/newActivity.png">
      <div class="no-data-box"><img class="no-data-img" src="../../images/mgt/myActivity/no-data.png" alt="这是图片">
        <p class="no-data-title">这里什么也没有</p></div>
    </div>
    <div class="M-box1 page-box" id="content-page-0"></div>
  </div>
  <!--进行中-->
  <div class="activity-project activity-content-1">
    <div class="activity-inner-box" id="activity_list_ing">
    </div>
    <div class="M-box1 page-box" id="content-page-1"></div>
  </div>
  <!--已结束-->
  <div class="activity-project activity-content-2">
    <div class="activity-inner-box" id="activity_list_end">
    </div>
    <div class="M-box1 page-box" id="content-page-2"></div>
  </div>
  <!--违规-->
  <div class="activity-project activity-content-3">
    <div class="activity-inner-box" id="activity_list_die">
    </div>
    <div class="M-box1 page-box" id="content-page-3"></div>
  </div>
  <!--未发布-->
  <div class="activity-project activity-content-4">
    <div class="activity-inner-box" id="activity_list_draft">
    </div>
    <div class="M-box1 page-box" id="content-page-4"></div>
  </div>
  <!--报名中-->
  <div class="activity-project activity-content-5">
    <div class="activity-inner-box" id="activity_list_sign_up">
    </div>
    <div class="M-box1 page-box" id="content-page-5"></div>
  </div>
</div>
<script>
  laypage({
    cont: $("#content-page-0"),
    pages: '0',
    skin: "#F66926",
    prev: '<',  //若不显示，设置false即可
    next: '>',  //若不显示，设置false即可
    jump: function (e, first) { //触发分页后的回调
      if (e.pages > 0) {
        ActivityList.customPage(e.curr, 0);
      } else {
        $('#activity_list_all').append('<img class="no-data-arrow" src="../../images/mgt/myActivity/newActivity.png" /><div class="no-data-box"><img class="no-data-img" src="../../images/mgt/myActivity/no-data.png" alt="这是图片" ' +
            '/><p class="no-data-title">这里什么也没有</p></div>');
      }
    }
  });
  laypage({
    cont: $("#content-page-1"),
    pages: '0', //可以叫服务端把总页数放在某一个隐藏域，再获取。假设我们获取到的是18
    skin: "#F66926",
    prev: '<',  //若不显示，设置false即可
    next: '>',  //若不显示，设置false即可
    jump: function (e, first) { //触发分页后的回调
      if (!first) {
        if (e.pages > 0) {
          ActivityList.customPage(e.curr, 1);
        } else {
          $('#activity_list_ing').append('<img class="no-data-arrow" src="../../images/mgt/myActivity/newActivity.png" /><div class="no-data-box"><img class="no-data-img" src="../../images/mgt/myActivity/no-data.png" ' +
              'alt="这是图片" /><p class="no-data-title">这里什么也没有</p></div>');
        }
      }
    }
  });
  laypage({
    cont: $("#content-page-2"),
    pages: '0', //可以叫服务端把总页数放在某一个隐藏域，再获取。假设我们获取到的是18
    skin: "#F66926",
    prev: '<',  //若不显示，设置false即可
    next: '>',  //若不显示，设置false即可
    jump: function (e, first) { //触发分页后的回调
      if (!first) {
        if (e.pages > 0) {
          ActivityList.customPage(e.curr, 2);
        } else {
          $('#activity_list_end').append('<img class="no-data-arrow" src="../../images/mgt/myActivity/newActivity.png" /><div class="no-data-box"><img class="no-data-img" src="../../images/mgt/myActivity/no-data.png" alt="这是图片" /><p class="no-data-title">这里什么也没有</p></div>');
        }
      }
    }
  });
  laypage({
    cont: $("#content-page-3"),
    pages: '0', //可以叫服务端把总页数放在某一个隐藏域，再获取。假设我们获取到的是18
    skin: "#F66926",
    prev: '<',  //若不显示，设置false即可
    next: '>',  //若不显示，设置false即可
    jump: function (e, first) { //触发分页后的回调
      if (!first) {
        if (e.pages > 0) {
          ActivityList.customPage(e.curr, 3);
        } else {
          $('#activity_list_die').append('<img class="no-data-arrow" src="../../images/mgt/myActivity/newActivity.png" /><div class="no-data-box"><img class="no-data-img" src="../../images/mgt/myActivity/no-data.png" alt="这是图片" /><p class="no-data-title">这里什么也没有</p></div>');
        }
      }
    }
  });
  laypage({
    cont: $("#content-page-4"),
    pages: '0', //可以叫服务端把总页数放在某一个隐藏域，再获取。假设我们获取到的是18
    skin: "#F66926",
    prev: '<',  //若不显示，设置false即可
    next: '>',  //若不显示，设置false即可
    jump: function (e, first) { //触发分页后的回调
      if (!first) {
        if (e.pages > 0) {
          ActivityList.customPage(e.curr, 4);
        } else {
          $('#activity_list_draft').append('<img class="no-data-arrow" src="../../images/mgt/myActivity/newActivity.png" /><div class="no-data-box"><img class="no-data-img" src="../../images/mgt/myActivity/no-data.png" alt="这是图片" /><p class="no-data-title">这里什么也没有</p></div>');
        }
      }
    }
  });
  laypage({
    cont: $("#content-page-5"),
    pages: '0', //可以叫服务端把总页数放在某一个隐藏域，再获取。假设我们获取到的是18
    skin: "#F66926",
    prev: '<',  //若不显示，设置false即可
    next: '>',  //若不显示，设置false即可
    jump: function (e, first) { //触发分页后的回调
      if (!first) {
        if (e.pages > 0) {
          ActivityList.customPage(e.curr, 5);
        } else {
          $('#activity_list_sign_up').append('<img class="no-data-arrow" src="../../images/mgt/myActivity/newActivity.png" /><div class="no-data-box"><img class="no-data-img" src="../../images/mgt/myActivity/no-data.png" alt="这是图片" /><p class="no-data-title">这里什么也没有</p></div>');
        }
      }
    }
  });
</script>
<script type="text/html" id="activity_item">
  <div class="activity-item">
    <div class="activity-pic pointer" onclick="pageSkip.goToMyActivityDetailAnchor('<%=id%>','')">
      <% if(status_label == '违规'){ %>
      <p class="wg">违规</p>
      <% }else if(status_label == '已结束'){ %>
      <p class="yjs">已结束</p>
      <% }else if(status_label == '暂停报名'){ %>
      <p class="ztbm">暂停报名</p>
      <% }else if(status_label == '报名结束'){ %>
      <p class="ztbm">报名结束</p>
      <% }else if(status_label == '进行中，可报名'){ %>
      <p class="jxzkbm">进行中，可报名</p>
      <% }else if(status_label == '进行中'){ %>
      <p>进行中</p>
      <% }else if(status_label == '报名中'){ %>
      <p class="bzm">报名中</p>
      <% } %>
      <img src="<%=banner%>" alt="">
    </div>
    <div class="activity-info">
      <p onclick="pageSkip.goToMyActivityDetailAnchor('<%=id%>','')" class="info-title hover-f66926"><%=title%></p>
      <p class="info-detail info-time">
        <span class="fa fa-clock-o"></span>
        <span class="info-detail-value"><%=time%></span>
      </p>
      <p class="info-detail info-address">
        <span class="fa fa-map-marker"></span>
        <span class="info-detail-value"><%=address%></span>
      </p>
      <p class="info-detail info-host">
        <span class="fa fa-user"></span>
        <span class="info-detail-value"><%=organizer_name%></span>
      </p>
      <div class="info-subtitle">
        <p class="hover-f66926" onclick="pageSkip.goToMyActivityDetailAnchor('<%=id%>','anchor_ticket')"><span
            class="info-subtitle-key">报名</span><span class="info-subtitle-value"><%=apply_count%></span></p>
        <p class="hover-f66926" onclick="pageSkip.goToMyActivityDetailAnchor('<%=id%>','anchor_message')"><span
            class="info-subtitle-key">留言</span><span class="info-subtitle-value"><%=messages%></span></p>
        <p><span class="info-subtitle-key">关注</span><span class="info-subtitle-value"><%=show_follows%></span></p>
      </div>
    </div>
    <div class="activity-btn">
      <button onclick="pageSkip.openActivityDetail('<%=id%>')">分享</button>
    <#--<button onclick="pageSkip.openEditStudioByCopyActivity('<%=id%>')">复制</button>-->
      <button onclick="pageSkip.goToMyActivityDetailAnchor('<%=id%>','')">管理</button>
    </div>
  </div>
</script>
<script type="text/html" id="draft_item">
  <div class="activity-item">
    <div class="activity-pic">
      <img src="<%=banner%>" alt="<%=title%>">
    </div>
    <div class="activity-info">
      <p class="info-title hover-f66926"><%=title%></p>
      <p class="info-detail info-time">
        <span class="fa fa-clock-o"></span>
        <span class="info-detail-value"><%=time%></span>
      </p>
      <p class="info-detail info-address">
        <span class="fa fa-map-marker"></span>
        <span class="info-detail-value"><%=address%></span>
      </p>
      <p class="info-detail info-host">
        <span class="fa fa-user"></span>
        <span class="info-detail-value"><%=organizer_name%></span>
      </p>
      <div class="info-subtitle">

      </div>
    </div>
    <div class="activity-btn">
      <button onclick="pageSkip.openEditStudioByDraftId('<%=id%>')">继续发布</button>
    <#--<button onclick="pageSkip.openEditStudioByCopyDraft('<%=id%>')">复制</button>-->
      <button onclick="ActivityList.delDraft(this,'<%=id%>')">删除</button>
    </div>
  </div>
</script>
<script>
  $(function () {
    var anchorId = window.location.hash;
    if (anchorId == '#anchor_playing') {
      $('.activity-doing').trigger('click');
    }
    if (anchorId == '#anchor_all') {
      $('.activity-all').trigger('click');
    }
    fixedRightBtn();
  })
</script>
<script type="text/javascript" src="../../data/mgt/stats" charset="UTF-8"></script>
</@layout.page>
